<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册 - 汇问</title>
    <link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Roboto:wght@300;400;700&display=swap" rel="stylesheet">
    <link href="../static/css/register.css" rel="stylesheet">
</head>
<body>
    <div id="particles-js"></div>
    <div class="grid-overlay"></div>

    <div class="container">
        <h2>用户注册</h2>
        <form id="registerForm">
            <div class="form-group">
                <label for="username">用户名</label>
                <input type="text" id="username" name="username" required>
                <div class="error" id="usernameError"></div>
            </div>
            <div class="form-group">
                <label for="email">邮箱</label>
                <input type="email" id="email" name="email" required>
                <div class="error" id="emailError"></div>
                <div class="verification-group">
                    <div class="verification-input">
                        <input type="text" id="verificationCode" name="verificationCode"
                               placeholder="请输入验证码" required>
                    </div>
                    <button type="button" id="getCodeBtn">获取验证码</button>
                </div>
                <div class="error" id="codeError"></div>
                <div class="success-message" id="successMessage"></div>
            </div>
            <div class="form-group">
                <label for="password">密码</label>
                <input type="password" id="password" name="password" required>
                <div class="error" id="passwordError"></div>
            </div>
            <div class="form-group">
                <label for="confirmPassword">确认密码</label>
                <input type="password" id="confirmPassword" name="confirmPassword" required>
                <div class="error" id="confirmPasswordError"></div>
            </div>
            <button type="submit">注册</button>
            <div class="loader" id="loader"></div>
            <div class="error" id="generalError"></div>
        </form>
        <div class="links">
            已有账号？<a href="/login">立即登录</a>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
    <script src="../static/js/register.js"></script>
</body>
</html>